package com.forekonw.demotest1024;


import java.util.Scanner;

/**
 *输入三个整数x,y,z，请把这三个数由小到大输出。
 */
public class exercisepaixu {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入三个整数：");
        int[] array = new int[3];
        for (int i = 0;i <array.length;i++){
            array[i]=input.nextInt();
        }
        for (int i = 0;i <array.length;i++){
            for (int j =0;j<array.length-1;j++){
                if (array[j] > array[j+1]) {
                    int a =array[j];
                    array[j]=array[j+1];
                    array[j+1]=a;
                }
            }
        }
        for (int i = 0;i <array.length;i++){
            System.out.println(array[i]);
        }
    }
}

